package com.ikingtech.framework.sdk.web.annotation;

import io.swagger.v3.oas.annotations.Operation;
import org.springframework.core.annotation.AliasFor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.lang.annotation.*;

/**
 * @author tie yan
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@RequestMapping(method = RequestMethod.GET)
@Operation
@RequestOrder
public @interface GetRequest {

    /**
     * Alias for {@link RequestMapping#value}.
     */
    @AliasFor(annotation = RequestMapping.class)
    String[] value() default {};

    /**
     * Alias for {@link RequestMapping#produces()}.
     */
    @AliasFor(annotation = RequestMapping.class)
    String[] produces() default {"application/json"};

    /**
     * Alias for {@link Operation#summary}.
     */
    @AliasFor(annotation = Operation.class)
    String summary() default "";

    /**
     * Alias for {@link Operation#description}.
     */
    @AliasFor(annotation = Operation.class)
    String description() default "";

    /**
     * Alias for {@link RequestOrder#order}.
     */
    @AliasFor(annotation = RequestOrder.class)
    int order() default Integer.MAX_VALUE;
}
